home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
keyb
/
ak100a.zip
/
ANSIKEY.DOC
next >
Wrap
Text File
|
1991-04-11
|
14KB
|
314 lines
ANSIKEY, version 1.0a
April 11, 1991
Keyboard function keys redefinition through
ANSI.SYS, made a whole lot easier!
(c) Copyright 1991 by Ping Huang,
All Rights Reserved
PLEASE READ THIS!
-----------------
I assume absolutely no legal or moral responsibility for any
damages which may result in any way from the use of this
program, nor do I make any guarantees as to its suitability for
your particular needs. Your choice to make use of this program
constitutes agreement with these terms. However, if you do
encounter problems, please drop me a line. I welcome any
comments, compliments, suggestions, *JOB*OFFERS*, etc. If you
like the program, and/or if it proves useful to you, read about
the Shareware concept.
You are hereby granted permission to make use of this software
ONLY AS LONG AS IT TAKES TO EVALUATE ITS SUITABILITY FOR YOUR
PURPOSES. Use after the trial period is an infringement on my
rights unless you have registered with me. Feel free to upload
to any BBS's you frequent (and even those you don't) or
distribute to other users in other ways, on the conditions that:
(1) you make no modifications to the software or docs without
express written permission; (2) all files related to this
program that you received, you are passing along, preferably in
the form ANSIKEY.ZIP; (3) it is not bundled with a commercial
package (unless prior arrangements have been made); (4) if disk
copying and handling charges are levied in the distribution of
this program, they MUST be $5 or less. [Flame: I'm sick tired of
dealers who charge $7-8 for disks that are nearly empty!]
If you have suggestions, problems, compliments, CONTRIBUTIONS
(hint,hint), et cetera, contact me:
Addresses to reach me at:
Ping Huang e-mail: pshuang@athena.mit.edu
1435 - 26th Avenue school: 450 Memorial Drive
San Francisco, CA 94122 Cambridge, MA 02139
===================
PROGRAM DESCRIPTION
===================
ANSIKEY makes it easy to make use of ANSI.SYS which came with your
computer's DOS to redefine certain keys on your keyboard. These
redefinitions (also known as macros) will work at the DOS command prompt
and any program (such as DEBUG and many other command-line based
programs) that uses DOS function calls and not ROM BIOS interrupts for
keyboard input. If that sounded like gobbly-gook to you... if the
program you have in mind has a fancy, full-screen display, then ANSIKEY
probably won't help you, but it won't hurt to try.
You probably can think up your own uses for such a capability, but I'll
tell you what kind of things I use it for (and I use it a lot, since I
wrote the program originally for own use and decided to refine it a bit
for general consumption). When I program using Turbo Pascal, and the
program is too large for me to run it in the IDE shell, I use ANSIKEY to
define F9 to compile the program with all the compiler switches that
would be tedious to type over and over again. I program Alt-E to always
mean EXIT so that after I shell out of a program to execute some DOS
commands, with a single keystroke I can go back to the application very
quickly. I program the other function keys to run programs that are
hidden deep in the directory structure of my hard disk, like
C:\FOO\BAR\LAMBDA\TURBO; by doing so I make it easy for me to run them,
but I don't have to include such lengthy directory names in my DOS PATH.
=============
PROGRAM USAGE
=============
ANSIKEY [DEF│UND│CLR│ESC│TST] [key scancode] [redefinition text]
By default, a brief condensed help screen appears on the screen.
THE FIRST PARAMETER
-------------------
■ DEF defines the key using the following string on the command line.
■ UND restores normal use of the key associated with the keycode.
■ CLR undos all redef's made using ANSI.SYS and takes no params.
This may or may not work properly with ANSI.SYS substitutes, notably
DBLANSI.SYS that comes with the software package DoubleDOS.
■ ESC outputs an ANSI command header(ESC+"["), followed by the rest of
the command line. Use only if you understand ANSI escape sequences.
You can use this to output ANSI codes that change the colors on your
screen, for example.
■ TST will output the scan code for the next key pressed.
After the computer executes your command, the redefinition text will
then be produced by the keystroke represented by the key scancode
entered on the command line; this text may include any IBM-ASCII
character with the exception of those that are translated; see the
translation section of this documentation for more details.
==========================
What is ANSI.SYS, you ask?
==========================
Good question. ANSI.SYS is a device driver, or a special type of
program, that comes with PC/MS-DOS. ANSI stands for American National
Standards Institute; a committee at ANSI created a set of standardized
codes for application programs to control how the screen looks by
outputting escape sequences, i.e. a stream of characters that are
preceded by the ESC character. Among the many functions that ANSI.SYS
provides is a way for keys to be redefined.
DOS does not automatically activate ANSI.SYS and load it into memory;
you must explicitly tell DOS to load the device driver into memory from
the ANSI.SYS file. To do this, look in the root directory of the disk
that you regularly boot up your computer from. If there is already a
file there called CONFIG.SYS, you need a text editor to insert this line
(use the appropriate drive letter and directory to the file ANSI.SYS):
DEVICE=[d:][\path\]ANSI.SYS
If CONFIG.SYS did not already exist, you should create one. The easy
quickest way to do so is log onto the boot drive and change to the root
directory. Then enter the following commands at the DOS command prompt:
COPY CON \CONFIG.SYS <ENTER>
DEVICE=[d:][\path\]ANSI.SYS <ENTER>
BUFFERS=30 <ENTER>
FILES=30 <ENTER>
Now type Ctrl-Z and a final <ENTER>; you should see the disk light come
on as the computer writes the info you typed into the CONFIG.SYS file.
NOTE: The last two lines are not necessary for ANSIKEY to work properly,
but will help to speed up your computer's disk operations.
=========================
OTHER FEATURES OF ANSIKEY
=========================
MNEMONIC ABBREVIATIONS
----------------------
The scan code numbers that represents keys are not easy to remember, and
you shouldn't have to look them up tediously in a table -- that's what
computers are for, after all. Thus, the TST parameter, which will return
the scancode for the next keystroke that you make. However, to make
things even easier, ANSIKEY knows a number of mnemonics for certain keys
for your convenience. Mnemonics must be entered exactly as they appear
below (although upper/lower case doesn't matter):
F1 through F12 CF1 through CF12
SF1 through SF10 AF1 through AF10
A-A through A-Z A1 through A0
The easy way to remember these mnemonics (ironic, isn't it, my telling
you how to remember the mnemonics) is to keep these rules in mind:
F1...F12 represents the function keys, while A...Z and 1...0
represent the respective keys on the keyboard.
Prefixing a 'A' character, a 'C' character, or a 'S' character means
that you are referring to the Alt'ed, Ctrl'ed, or Shifted function
keys. (That is, hold the Alt or Ctrl or Shift key down while
pressing one of the function keys.)
CHARACTER SUBSTITUTION
----------------------
ANSIKEY by default will replace certain special characte